const StatsPlugin = require("stats-webpack-plugin");

// const UselessFile = require("useless-files-webpack-plugin");

const path = require("path");

function resolve(dir) {
    return path.join(__dirname, dir);
}

const config = {
    output: {
        library: "BDMS400",
        libraryTarget: "window",
    },
    plugins: [
        new StatsPlugin("manifest.json", {
            chunkModules: false,
            entrypoints: true,
            source: false,
            chunks: false,
            modules: false,
            assets: false,
            children: false,
            exclude: [/node_modules/],
        }),
        // new UselessFile({
        //     root: "./src", // 项目目录
        //     out: "./fileList.json", // 输出文件列表
        //     clean: false, // 是否删除文件,
        //     // exclude: /json/, // 排除文件列表
        // }),
    ],
    module: {
        rules: [],
    },
};

module.exports = config;
